﻿using System;

namespace 访问者模式
{
   public  class VacationVisitor: IVisitor
    {
       public void Visit(Element element)
       {
           var employee = element as Employee;
            // Provide 3 extra vacation days
           if (employee != null)
               Console.WriteLine($"{employee.GetType().Name} {employee.Name}'s new vacation days: {employee.VacationDays}");
       }
    }
}
